﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;

namespace LevelEditor.Model.Entity
{
    //For now, PhysicBoy will consist of Simple Box, later i will add more Shape
    [Serializable]
    public class PhysicBody : INotifyPropertyChanged
    {
        public Decimal Elasticity { get; set; }
        public Decimal Friction { get; set; }
        public Decimal CollisionType { get; set; }

        private double x;
        private double y;
        private double width;
        private double height;

        public double X { get { return x; } set { x = value; NotifyPropertyChanged("X"); } }
        public double Y { get { return y; } set { y = value; NotifyPropertyChanged("Y"); } }
        public double Width { get { return width; } set { width = value; NotifyPropertyChanged("Width"); } }
        public double Height { get { return height; } set { height = value; NotifyPropertyChanged("Height"); } }

        // Implement INotifyPropertyChanged interface.
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
